﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Krile.Forms.ConfigForm.Children
{
    public partial class Detail : Krilib.Control.ConfigPage
    {
        public Detail()
        {
            InitializeComponent();
        }

        private void Detail_Load(object sender, EventArgs e)
        {
            NormalListHeight.Value = Core.Config.Appearance.Renderer.Detail.NormalListHeight;
            SelectedListMinHeight.Value = Core.Config.Appearance.Renderer.Detail.SelectedListMinHeight;
            TextRenderingMargin.Value = Core.Config.Appearance.Renderer.Detail.TextRenderingMargin;
            DateTimeFormat.Text = Core.Config.Appearance.Renderer.Detail.DateTimeFormat;
        }

        public override void Apply()
        {
            Core.Config.Appearance.Renderer.Detail.NormalListHeight = (int)NormalListHeight.Value;
            Core.Config.Appearance.Renderer.Detail.SelectedListMinHeight = (int)SelectedListMinHeight.Value;
            Core.Config.Appearance.Renderer.Detail.TextRenderingMargin = (int)TextRenderingMargin.Value;
            Core.Config.Appearance.Renderer.Detail.DateTimeFormat = DateTimeFormat.Text;
            base.Apply();
        }
    }
}
